﻿namespace DimensionsHelper.ExcelAddIn.Core.Sql;

/// <summary>
/// 码表的分类元素
/// </summary>
public class CodeMapElement
{

    public CodeMapElement(CodeMapElementLevel? level, string code, string label)
    {
        ContainingLevel = level;
        Code = code;
        Label = label;
    }


    /// <summary>
    /// 包含此码号的分类级别
    /// </summary>
    public CodeMapElementLevel? ContainingLevel { get; }


    /// <summary>
    /// 分类码号
    /// </summary>
    public string Code { get; }


    /// <summary>
    /// 分类描述
    /// </summary>
    public string Label { get; }


    /// <summary>
    /// 如果当前类别是码号级别，返回<see langword="true"/>
    /// </summary>
    public virtual bool IsLevel => false;

}
